package pt.ipleiria.plp.Lixeiras;

/**
 * Class that is abstract and the has the important send method
 * @author Filipe Felisberto e Ricardo Silva
 */
public abstract class LixeiraPending extends Lixeira {

    public LixeiraPending(String guid,String title,String state) {

        super(guid,title,state);

    }

    /**
     * Method responsible for sending the data to the server, each extending class
     * will implement it according to its needs
     * @param app the application key
     * @return the result of the operation
     */
    public abstract LixeiraSendResult send(String app);

    /**
     * Returns a new LixeiraSent with the data from this pending one
     * @return a new LixeiraSent
     */
    public LixeiraSent toSentStatus(){

        return new LixeiraSent(getGuid(), getTitle(), getState());
    }

}
